import socket
def main(): 
    udp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    udp_socket.bind(('',8086))

    while True:
        data = input('Msg:')
        if data == 'exit':
            break
        udp_socket.sendto(data.encode('utf-8'), ('192.168.1.212',8084))
        r = udp_socket.recv(2048)
        print(r.decode('utf-8'))

    udp_socket.close()

if __name__ == "__main__":
    main()